@import "../../../styles/animate";

.toggle-sidemenu {
    position: fixed;
    color: #d2e2f4;
    cursor: pointer;
    background: #3787dd;
    left: 160px;
    top: 4px;
    height: 30px;
    width: 30px;
    padding-left: 5px;
    line-height: 30px;
    border-radius: 5px 0 0 5px;
    z-index: 21;
    .fa {
        margin-top: 7px;
    }
    .fa-angle-double-right {
        display: none;
    }
    &:hover {
        width: 35px;
        left: 155px;
        overflow: hidden;
    }
}

.sidebar-left {
    $bg: #2f4050;
    $font-color: #c3ccdb;
    $bg-branding: #1c6ec7;
    $bg-li: #1d2933;
    $bg-li-hover: #11191f;
    $bg-li-actived: #1d2933;
    $bg-sub-ul: #293846;
    $icon-color: #a7b1c2;
    $icon-sub-color: #c6c6c6;
    $font-color-actived: #fff;

    position: fixed;
    top: 0;
    z-index: 20;
    background: $bg;
    width: 180px;
    min-height: 100%;
    box-shadow: 2px 0 3px rgba(0, 0, 0, 0.08);
    overflow: hidden;

    .branding {
        background: $bg-branding;
        height: 40px;
        padding: 1px 0 0;
        width: 180px;

        a {
            display: block;
            margin: 3px 0 0 20px;
            background: url('../images/logo.png') no-repeat;
            text-indent: -999em;
            height: 100%;
        }
    }

    nav {
        width: 180px;
    }

    .sidebar-menu {
        position: absolute;
        height: 100%;
        width: 197px;
        overflow-y: scroll;

        li {
            background: $bg-li;
            a, span{
                cursor: pointer;
                display: block;
                padding: 10px 15px;
                color: $font-color;
                text-decoration: none;
                i {
                    color: $icon-color;
                    width: 25px;
                    margin-right: 10px;
                    text-align: center;
                    @include transition();
                }
                &:hover, &:focus {
                    background-color: #4A5A6D;
                    color: $font-color-actived;
                    > i {
                        color: $font-color-actived;
                    }
                }
                &.sup {
                    &:after {
                        float: right;
                        content: '\f0da';
                        line-height: 20px;
                        font-size: 12px;
                        font-family: 'FontAwesome';
                        color: $icon-sub-color;
                    }
                    &.opened{
                        &:after {
                            float: right;
                            content: '\f0d7';
                            line-height: 20px;
                            font-size: 12px;
                            font-family: 'FontAwesome';
                            color: $icon-sub-color;
                        }
                    }
                }
            }
            > ul {
                list-style: none;
                margin: 0;
                padding: 0;
                height: 0;
                background: $bg-sub-ul;
                overflow: hidden;

                li {
                    font-size: 0.93em;
                    background: transparent;
                    a {
                        display: block;
                        padding: 8px 8px 8px 35px;
                    }
                }

                &:before, &:after {
                    content: ' ';
                    display: block;
                    margin-top: 5px;
                }
            }

            &.actived {
                background: #2270c5;
                > a {
                    background-color: transparent;
                    color: $font-color-actived;
                    > i {
                        color: $font-color-actived;
                    }
                }
            }
        }
    }
    .sidebar-menu:before {
        content: ' ';
        display: block;
        margin-top: 10px;
    }
}

.hide-nav {
    .toggle-sidemenu {
        color: #d2e2f4;
        background: #1c6ec7;
        left: 58px;
        width: 20px;
        border-radius: 0 5px 5px 0;
        padding-left: 5px;

        .fa-angle-double-right {
            display: block;
        }
        .fa-angle-double-left {
            display: none;
        }
        &:hover {
            width: 25px;
            padding-left: 10px;
        }
    }

    .sidebar-left {
        width: 58px;
        .sidebar-menu {
            li {
                .nav-welcome {
                    margin-left: -109px;
                }
                i {
                    margin-right: 18px;
                }
                > ul {
                    li {
                        a {
                            padding-left: 15px;
                        }
                    }
                }
            }
        }
    }
}

.nav-tooltip {
    margin-left: -120px !important;
}